package com.laolei.zookeeper.core.impl;

import org.springframework.util.SerializationUtils;

import com.laolei.zookeeper.core.SerializationOperations;

public class JdkSerializationOperations<D> implements SerializationOperations<D>{

	@Override
	public byte[] serialize(D data) {
		return SerializationUtils.serialize(data);
	}

	@Override
	@SuppressWarnings("unchecked")
	public D deserialize(byte[] data) {
		return (D) SerializationUtils.deserialize(data);
	}
 
}
